home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / pascal / spooldb.com / SPOOL.DOC < prev    next >
Encoding:
Text File  |  1990-04-18  |  6.2 KB  |  156 lines

  1.  
  2. This software is hereby donated to the public domain by the author, David
  3. Bradley.  All I ask is that you leave my name where it is.  If you modify the
  4. code, add your name, but leave mine as is.  I hope you find this bit of software
  5. useful.  If you do, I'd like to know, just drop me a message on BIX or contact
  6. me at home.  There is a possibility that upgrades will occur.  If they do,
  7. you'll should be able to find them on a local bulletin board.  If not, for a
  8. small fee, I'll send you a copy.  You can contact me on BIX, send EMail to bwd. 
  9. My phone number is (513) 539-7825.  Address:  55 Ohio Ave.
  10.                                               Monroe, OH   45050
  11.  
  12.  
  13.  
  14.  
  15.                                  INSTRUCTIONS
  16.  
  17. This is a unit that gives your programs the ability to spool print jobs.  There
  18. is only one requirement.  The DOS PRINT utility must be resident or a spooler
  19. that will emulate it.  This unit does not actually do the spooling itself, but
  20. gives you access to the DOS PRINT utility.  It passes the name of a file to the
  21. utility to be printed.  It also has various functions to control and monitor the
  22. spooler.  As long as your DOS PRINT utility works on the system, this unit
  23. should work fine.
  24.  
  25. There are basically three steps you must follow to use this unit.  First, the
  26. DOS PRINT utility must be resident upon execution of the program.  Second,
  27. you'll need to use the Get_Spool_Name to get a name to use as the file name to
  28. print to.  Third, after closing the file, execute the Submit procedure to submit
  29. the file to the spooler.
  30.  
  31. The following is a list of the procedures contained within the unit and a
  32. description:
  33.  
  34.  
  35. procedure Submit;
  36.  
  37.      This procedure submits that last file name generated by the
  38.      Get_Spooler_Name function.  If the spooler is not installed, it will not do
  39.      anything.
  40.  
  41.  
  42. function Submit_File(Name:string):boolean;
  43.  
  44.      This function is identical to the above Submit procedure, except it allows
  45.      you to specify the file name to submit to the spooler.  If the operation
  46.      was successful, the function returns true, else it will return false.
  47.  
  48.  
  49. function Submit_Files(Name:string):boolean;
  50.  
  51.      This function is the same as Submit_File, except it allows the use of
  52.      standard DOS wildcards, and will submit all files matching the file name.
  53.  
  54.  
  55. function Cancel_File(Name:string):boolean;
  56.  
  57.      This function allows you to cancel a job or jobs that are qued.  Wildcards
  58.      are allowed.  If successful, the function returns true, else it will return
  59.      false.
  60.  
  61.  
  62. procedure Terminate_Spooler;
  63.  
  64.      This function terminates the spooler.
  65.  
  66.  
  67. function Get_Spooler_Entry:string;
  68.  
  69.      This function will return the next spooler entry.  If the first string
  70.      returned is blank, then spooler is empty.  The function will return the
  71.      next spool entry in line until the end is reached, then it will return a
  72.      null string.  Note, this option will pause the spooler also.  A
  73.      Resume_Spooler will restart the spooler.  The current job will continue
  74.      where it left off.
  75.  
  76.  
  77. procedure Pause_Spooler;
  78.  
  79.      Temporary halts the spooler.  Use Resume_Spooler to restart the spooler.
  80.  
  81.  
  82. procedure Resume_Spooler;
  83.  
  84.      This procedure will resume the spooler after a Get_Spooler_Entry or
  85.      Pause_Spooler routine has been called.  The spooler will resume where it
  86.      left off.
  87.  
  88.  
  89. function Spooler_Installed:boolean;
  90.  
  91.      This function returns true if PRINT, or compatible spooler, is resident.
  92.  
  93.  
  94. function Get_Spool_Name:string;
  95.  
  96.      This function will return the next spool name in line.  The name is in the
  97.      format of SPOOL.XXX, where XXX is a number between 0 and 999.  This ensures
  98.      that none of your jobs conflict with another.
  99.  
  100.  
  101. function Spooler_Empty:boolean;
  102.  
  103.      This function will return true if the spooler is empty, else it will return
  104.      false.
  105.  
  106.  
  107.  
  108. There is a SpoolExitProc variable.  This variable is initialized to a default
  109. routine that checks for active spool jobs upon termination of the program.  If
  110. you wish, you may set it to a procedure of your own, so that your program may
  111. take control.  The procedure should be a standard procedure with no parameters.
  112.  
  113.  
  114. NOTE:
  115.  
  116. This unit was compiled using Turbo Pascal Version 5.0.  If your using version
  117. 4.0 or lower, you may run into some problems.  Version 4.0 should, and I stress
  118. should, work ok.  The conditional statements should handle the differances.  If
  119. your using version 4.0, it will be up to your program to call the exit spooler
  120. routine before your program terminates, if you want to.  If your using a pre 4.0
  121. compiler, good luck.
  122.          ----------------end-of-author's-documentation---------------
  123.  
  124.                         Software Library Information:
  125.  
  126.                    This disk copy provided as a service of
  127.  
  128.                         The Public (Software) Library
  129.  
  130.          We are not the authors of this program, nor are we associated
  131.          with the author in any way other than as a distributor of the
  132.          program in accordance with the author's terms of distribution.
  133.  
  134.          Please direct shareware payments and specific questions about
  135.          this program to the author of the program, whose name appears
  136.          elsewhere in  this documentation. If you have trouble getting
  137.          in touch with the author,  we will do whatever we can to help
  138.          you with your questions. All programs have been tested and do
  139.          run.  To report problems,  please use the form that is in the
  140.          file PROBLEM.DOC on many of our disks or in other written for-
  141.          mat with screen printouts, if possible.  The P(s)L cannot de-
  142.          bug programs over the telephone.
  143.  
  144.          Disks in the P(s)L are updated monthly, so if you did not get
  145.          this disk  directly from the P(s)L,  you should be aware that
  146.          the files in this set may no  longer be the current versions.
  147.  
  148.          For a copy of the latest monthly software library newsletter
  149.          and a list of the 2,000+ disks in the library, call or write
  150.  
  151.                         The Public (Software) Library
  152.                               P.O.Box 35705
  153.                            Houston, TX 77235-5705
  154.                                (713) 524-6394
  155.  
  156.